import type { RemoteLinkData } from '../../shares/sharesApp';

export function hall() {
    remoteChannel.onServerEvent(
        ({
            entity,
            args,
        }: {
            entity: GamePlayerEntity;
            args: RemoteLinkData;
        }) => {
            const { type, data } = args;
            if (type === 'link') {
                console.log(
                    '(Server)',
                    'entity:',
                    entity,
                    'type:',
                    type,
                    'data:',
                    data
                );
                entity.player.link(data);
            }
        }
    );
}
